home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / Softshoe / Lisa's Mac Parts / AppleEvents / Events / AEParameter.cp < prev    next >
Text File  |  2000-06-23  |  733b  |  37 lines

  1. // AEParameter.cp
  2.  
  3. #ifndef AEParameter_h
  4. #include "AEParameter.h"
  5. #endif
  6. #ifndef OSError_h
  7. #include "OSError.h"
  8. #endif
  9. #ifndef ConstData_h
  10. #include "ConstData.h"
  11. #endif
  12. #ifndef AEEvent_h
  13. #include "AEEvent.h"
  14. #endif
  15.  
  16. void AEParameter::Remove()
  17.   {
  18.     Assert( !Event().IsNull() );
  19.     ThrowOSError( AEDeleteParam( &Event(), Key().Key() ) );
  20.   }
  21.  
  22. void AEParameter::operator=( const AEDescriptor& in )
  23.   {
  24.     Assert( !Event().IsNull() );
  25.     ThrowOSError( AEPutParamDesc( &Event(), Key().Key(), &in ) );
  26.   }
  27.  
  28. void AEParameter::Set( AEType type, ConstData data )
  29.   {
  30.     Assert( !Event().IsNull() );
  31.     ThrowOSError( AEPutParamPtr( &Event(),
  32.                                           Key().Key(),
  33.                                           type.Type(),
  34.                                           data.Start(),
  35.                                           data.Length() ) );
  36.   }
  37.